home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / sound / effect10.zip / EFFECT10.DOC < prev    next >
Text File  |  1993-11-07  |  15KB  |  320 lines

  1.                          EFFECT10.EXE DESCRIPTION                         
  2.                          ------------------------                         
  3.  
  4.                         Jos Groot, November 7, 1993                       
  5.  
  6.  
  7. This file describes the first release of the program EFFECT10,  which  can 
  8. be used to add real time sound effects (for example,  an  echo)  to  sound 
  9. input to a Sound Galaxy NX Pro 16 soundcard or compatible. 
  10.  
  11. 1. INTRODUCTION
  12. ---------------
  13.  
  14. The Sound Galaxy NX Pro 16 (SGPRO16) is a 16-bit  stereo  sound  card.  It 
  15. contains a chip, the AD1848, which can sample and playback up  to  48  kHz 
  16. sample rate. EFFECT10 accesses this chip  directly  to  create  the  sound 
  17. effects. It uses the chip in its mono mode.
  18.  
  19. The Microsoft Windows Sound System uses this  chip  also.  I  expect  that 
  20. EFFECT10 functions with this card. However, I didn't  test  it.  The  same 
  21. holds for all other cards which claim (hardware)  compatibility  with  the 
  22. Microsoft system, or use an AD1848. EFFECT10 uses an  initialization  file 
  23. which includes the IO addresses used, which probably should be changed  to 
  24. use other cards (see below). 
  25.  
  26. Section 5 of this file contains some additional information on the  AD1848 
  27. for those interested. 
  28.  
  29. The program was written in Turbo Pascal 6.0 on a  33  MHz  80386  machine, 
  30. with an ordinary IDE (AT) IO  bus  running  at  11  MHz.  All  performance 
  31. figures given were measured on this machine. I expect the program to  work 
  32. on all 80286 and higher IDE bus computers with a VGA card. 
  33.  
  34. 2. GETTING STARTED
  35. ------------------
  36.  
  37. Start EFFECT10. One of the first things the  program  does  is  trying  to 
  38. detect the AD1848 of the SGPRO16. If it does, no problem. If  it  doesn't, 
  39. the program possibly uses the wrong IO addresses. These are read from  the 
  40. configuration file EFFECT10.CFG. Page A-7 of the Sound  Card  User  Manual 
  41. (version 1.1) of your SGPRO16 documentation contains some  information  on 
  42. the IO addresses used. It uses 8 contiguous bytes beginning at one of  the 
  43. following base addresses WAVBase: $530 (default), $E80, $F40 or $604  (the 
  44. $ is the Turbo Pascal method for writing hexadecimal  numbers).  The  base 
  45. address used is selected with the jumpers J6 and J7  (page  I2-10  of  the 
  46. User Manual). EFFECT10.CFG contains 4 addresses, because the  AD1848  uses 
  47. only 4 of the 8 IO addresses. These are: 
  48.  
  49.    Address   |  Description      | Default (WAVBase= $530)
  50. -----------------------------------------------------------
  51. WAVBase + 4H | Codec Address     |        $534
  52. WAVBase + 5H | Codec Data        |        $535
  53. WAVBase + 6H | Codec Status      |        $536
  54. WAVBase + 7H | Codec Direct data |        $537
  55.  
  56. The AD1848 is referred to as the Codec (coder/decoder) in this table.  The 
  57. configuration file of this archive assumes  use  of  the  default  WAVBase 
  58. address, $530. If your card is configured  differently,  change  the  four 
  59. entries in the configuration file accordingly. 
  60.  
  61. 3. PROGRAM OPTIONS
  62. ------------------
  63.  
  64. The main menu presents some commands which are selected  by  pressing  the 
  65. first letter of the command. The next sections describe each  of  them.  I 
  66. suggest that you also work through all the program options in this order.
  67.  
  68. 3.1 Report configuration
  69. ------------------------
  70.  
  71. Shows the figures read from the configuration file EFFECT10.CFG, and  some 
  72. other more or less useful info. Use it to  check  that  the  program  read 
  73. EFFECT10.CFG correctly.
  74.  
  75. 3.2 Sample rate
  76. ---------------
  77.  
  78. The AD1848 of the SGPRO16 can operate at 14 different software  selectable 
  79. sample rates (frequencies), ranging from 5.5 to 48 kHz. Select one here. 
  80.  
  81. Because the exact frequency depends on the crystals used, the frequency is 
  82. measured by the program. This value is used for all computations.  As  far 
  83. as I know, the  SGPRO16  uses  the  crystals  recommended  in  the  AD1848 
  84. datasheets, so the 14 frequencies  shown  by  EFFECT10  are  correct.  All 
  85. algorithms of the program will operate at the measured frequency. 
  86.  
  87. The default sample rate can be changed in the configuration file.
  88.  
  89. 3.3 Plot
  90. --------
  91.  
  92. This option plots the signal, or  its  frequency  spectrum.  Connect  your 
  93. musical instrument (for example, an electric  guitar)  or  the  microphone 
  94. supplied with your SGPRO16 to the microphone input of the card. Select the 
  95. Plot option. 
  96.  
  97. The top of the screen contains the current sample rate, the x- and  y-axis 
  98. range and units, and some statistical information. The y-axis range can be 
  99. changed in the configuration file ("Voltage for full ADC input").  If  you 
  100. have a tone generator and an oscilloscope  you  can  measure  the  correct 
  101. value. Substituting this value in the configuration file turns your  sound 
  102. card into a calibrated slow digital scope. The statistical information  is 
  103. the minimum, maximum, average and RMS (root-mean-square) value of the plot 
  104. below. The RMS value can be used to estimate the amount of noise  when  no 
  105. (or a constant) signal is input. 
  106.  
  107. At the center is a plot of 640 samples. If you make your instrument sound, 
  108. or whistle into the microphone the plot  should  change.  If  it  doesn't, 
  109. check the connections. If the signal is  too  large  (small),  you  should 
  110. decrease (increase) the input gain entry in the configuration file. 
  111.  
  112. Below the plot is a sub-menu with several options: 
  113.  
  114. Statistics: turns the statistical information at the top on or off.
  115.  
  116. Decrease/Increase delay: the plot is refreshed every X seconds. The  delay 
  117.   X can be changed with this option.
  118.  
  119. Frequency spectrum: if you  select  this  option  a  512  point  frequency 
  120.   spectrum is plotted. Now you can for example see how the place at  which 
  121.   you hit a guitar string affects the spectral content of the sound  (this 
  122.   affects the timbre, not  the  pitch).  I  myself  discovered  that  some 
  123.   annoying high noise from my computer had a frequency  of  9.3  kHz.  The 
  124.   y-direction  scale  factor  for  this  plot  can  be  altered   in   the 
  125.   configuration  file,  if  you  wish.  The  statistical  information  now 
  126.   indicates the 4 frequencies with the highest intensity.  Note  that  the 
  127.   x-direction scale changes with the sample  rate:  the  highest  spectrum 
  128.   frequency is half the sample rate. 
  129.  
  130. Non-continuous mode: selecting this option lets one determine when to take 
  131.   and plot the samples or a spectrum  ("Next  frame"  option).  The  other 
  132.   options of the changes sub-menu allow  you  to  measure  the  plot  more 
  133.   accurately and to save it to the file EFFECT10.PLT. 
  134.  
  135. Main menu: returns one to the main menu. 
  136.  
  137. 3.4 Distortion
  138. --------------
  139.  
  140. Now its time to get some sound output. Connect an amplifier or speaker  to 
  141. the speaker/headphone connector of the SGPRO16 card. Select the Distortion 
  142. option and set the level to 0. The only thing the program does is  reading 
  143. ADC sample values and feeding them to the DAC, without  altering  them  at 
  144. all. You should now hear the sound  you  input  to  the  card.  If  it  is 
  145. distorted there are two possible causes: if the input level is  too  high, 
  146. adjust your instrument volume, or decrease the input  gain  entry  in  the 
  147. configuration file. If the output level is too high, adjust  it  with  the 
  148. volume control on your card, or decrease the DAC attenuation entry in  the 
  149. configuration file. 
  150.  
  151. My machine is not fast enough to run this algorithm at 48 kHz. At  48  kHz 
  152. clicks are audible, because the program is sometimes too late  to  read  a 
  153. sample from the ADC. The highest  sample  rate  that  doesn't  cause  this 
  154. problem is 32 kHz. If you have a very slow machine, the number of  samples 
  155. it misses is so large that it causes  the  sound  to  be  distorted  quite 
  156. heavily. 
  157.  
  158. Setting the distortion level to a  level  higher  than  0  will  create  a 
  159. distorted sound. I use quite a naive algorithm. For a  certain  distortion 
  160. level (Level) the value input to the DAC (In) is related to the ADC output 
  161. (Out) by: 
  162.  
  163.                                     (1 - Level/10) 
  164.                          ( ab